---
title: Search
summary: Screen where bill-entry staff search bills by criteria and open a result for entry.
status: draft
owner: Claims
last_reviewed: 2026-09-30
---

# Search

The Search screen finds bills by bill id, billing provider, worker, claim number, status, type or received date. The user fills in criteria, runs the search, and opens a result on the [Bill entry](entry.md) screen. The claim number is pre-filled from the current web-context value.

## Route

| Controller | Action | Verb | URL | Parameters | View | Layout |
| --- | --- | --- | --- | --- | --- | --- |
| `SearchController` | `Index` | GET | `/ClaimBillEntry/Search/Index` | None | `Views/Search/Index.cshtml` | `~/Views/Shared/_Bootstrap3.cshtml` |

## Access

| Requirement | Declared on | Effect |
| --- | --- | --- |
| `[SaifAuthorize(Roles = "CBPEnterBill")]` | `SearchController` | Only users in the `CBPEnterBill` role can open the screen or call `Search/GetBills`. |

## Entry conditions
- The user follows a link from the layout top menu or side menu for menu category `CLBLE`; the menu entries themselves are defined outside this repository.**
- The user opens the URL directly.

The action loads the bill type and bill status code lists, loads the "Search" grid preferences, and pre-fills `ClaimNumber` from the current web-context value.

## Fields

| Field | Binds to | Control | Purpose | Validation |
| --- | --- | --- | --- | --- |
| Bill id | `SearchCriteriaViewModel.BillId` | Text box | Bill number | `maxlength` 9 |
| Billing TIN | `SearchCriteriaViewModel.ProviderTaxId` | Text box | Billing provider tax id | `maxlength` 9 |
| Provider id | `SearchCriteriaViewModel.ProviderLocationId` | Text box | Provider location id | `maxlength` 7 |
| Bill status | `SearchCriteriaViewModel.BillStatusCode` | Dropdown | Status filter; list comes from the bill query service | None |
| Bill type | `SearchCriteriaViewModel.BillTypeCode` | Dropdown | Type filter | None |
| Worker SSN | `SearchCriteriaViewModel.WorkerTaxId` | Kendo MaskedTextBox | Worker social security number | Mask `999-99-9999` |
| Claim number | `SearchCriteriaViewModel.ClaimNumber` | Text box | SAIF claim number | `maxlength` 7 |
| Received from and thru | Received date range properties | Kendo DatePicker | Date range the bill was received | None declared |
| Search and Reset | — | Buttons | Refresh or clear the grid | None |

`SearchCriteriaViewModel` carries an `ApplyValidation` flag. Save preferences and Clear preferences links sit under the criteria.

## Operations

| Operation | Trigger | Request | Description | Delegates to |
| --- | --- | --- | --- | --- |
| Search bills | Search button; grid read with data from `search.onSearchRetrieve` | `GET Search/GetBills` | Runs the bill query only when at least one qualifying criterion is supplied and returns the matching bills with secure, maximum-retrieved and no-results messages. | [Search bills and open a result](../application/operations/search-and-open-bill.md) |
| Reset | Reset button | — | Client-side only; clears the criteria and the grid. | — |
| Save grid preferences | Save preferences link | `POST Inbox/SavePreferences` | Stores the user's grid column layout. | [Search bills and open a result](../application/operations/search-and-open-bill.md) |
| Clear grid preferences | Clear preferences link | `POST Inbox/ClearPreferences` | Removes the stored grid column layout. | [Search bills and open a result](../application/operations/search-and-open-bill.md) |
| Open bill | Open a result row | — | Client-side only; navigates to the Bill entry screen when the bill status allows it. | [Search bills and open a result](../application/operations/search-and-open-bill.md) |

The search calls `GetBillEntryBillsByCriteria` on the bill query service; the linked workflow page documents the call, and the internal steps of the package service were not traced. Only the Reset button is a screen-local handler. See [dependencies](../application/dependencies.md).

## Dialogs and partials

| Name | Opens as | Returned by | Purpose |
| --- | --- | --- | --- |
| `_SearchCriteria` | Inline `Html.Partial` | Rendered by `Views/Search/Index.cshtml` | Criteria fields, Search and Reset buttons and the preference links. |
| `_SearchResultGrid` | Inline `Html.Partial` | Rendered by `Views/Search/Index.cshtml` | Kendo Grid `SearchGrid` with `AutoBind` false and height 460. |

## AJAX and grid actions

| Request | Kind | Called by | Returns |
| --- | --- | --- | --- |
| [`ANY Search/GetBills`](../application/hosted-endpoints.md#search.getbills) | Grid read | `SearchGrid` transport | DataSourceResult with messages |
| [`POST Inbox/SavePreferences`](../application/hosted-endpoints.md#basecontroller.savepreferences) | AJAX call with no returned result | Save preferences link, intercepted by `claimbillentry.js` | Empty response; the action is `void` |
| [`POST Inbox/ClearPreferences`](../application/hosted-endpoints.md#basecontroller.clearpreferences) | AJAX call with no returned result | Clear preferences link, intercepted by `claimbillentry.js` | Empty response; the action is `void` |

## Client-side behavior
- **Script module:** `ClaimBillEntry/js/ClaimBillEntry.search.js`, with the shared `ClaimBillEntry/js/claimbillentry.js`.
- `SearchGrid` does not auto-bind; the grid reads only after the user runs a search.
- Secure, maximum-retrieved and no-results messages are shown with toastr.
- The server actions are `void` methods on `BaseController` without an HTTP verb restriction (documented as `ANY`), but the shared script always uses POST to the hard-coded `/ClaimBillEntry/Inbox/` URLs; the view's own preference links use `Url.Action(" SavePreferences")` with a leading space, which does not resolve to an action. See [Tech debt](../application/tech-debt.md).

## Business rules

| Rule ID | Rule | Enforcement | Source |
| --- | --- | --- | --- |
| [BR-SCR-013](../application/business-rules.md#br-scr-013-search-requires-qualifying-criteria) | A search runs only when bill id, TIN, provider id, SSN, claim number or a received date is supplied; status and type alone are not enough, and an input-error message is returned when `ApplyValidation` is set. | Action check | `ClaimBillEntry/Controllers/SearchController.cs:62-110` |
| [BR-SCR-001](../application/business-rules.md#br-scr-001-bills-must-be-in-an-openable-status) | Only Pending, Entered, Audited or Suspended bills may be opened. | Client script | `ClaimBillEntry/js/ClaimBillEntry.search.js:4-5`, `:122`, `:132` |

## Navigation

| Target | Trigger | Parameters |
| --- | --- | --- |
| [Bill entry](entry.md) | Open a result row for an openable bill | Bill id in `/ClaimBillEntry/Entry/Index/{billId}` |

---

> **Note:** Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- ClaimBillEntry/Controllers/SearchController.cs
- ClaimBillEntry/Controllers/BaseController.cs
- ClaimBillEntry/Views/Search/Index.cshtml
- ClaimBillEntry/Views/Search/_SearchCriteria.cshtml
- ClaimBillEntry/Views/Search/_SearchResultGrid.cshtml
- ClaimBillEntry/Views/Shared/_Bootstrap3.cshtml
- ClaimBillEntry/ViewModels/Search/SearchCriteriaViewModel.cs
- ClaimBillEntry/Classes/AutoMapperBootStrapper.cs
- ClaimBillEntry/js/ClaimBillEntry.search.js
- ClaimBillEntry/js/claimbillentry.js
